<template>
	<view class="bi-certificate-upload">
		<template v-if="!image">
			<view class="bi-certificate-upload__icon">
				<ui-icon name="camera-fill" size="30px" color="#cdced7"></ui-icon>
			</view>
			<view class="bi-certificate-upload__text">
				{{ text }}
			</view>
		</template>
		<template v-else>
			<ui-image class="bi-certificate-upload__image" :previewable="true" :src="image" width="100%" height="100%"></ui-image>
		</template>
	</view>
</template>

<script>
export default {
	name: 'BiCertificateUpload',
	props: {
		text: {
			type: String
		},
		image: {
			type: String
		}
	}
}
</script>

<style>
.bi-certificate-upload{
	height: 144px;
	background-color: #F3F4F6;
	border-radius: 3px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.bi-certificate-upload__text{
	font-size: 12px;
	color: #788295;
	margin-top: -3px;
}
.bi-certificate-upload__image{
	width: 100%;
	height: 100%;
}
</style>